package day26;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class Homework1 {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException {
        Class c=Class.forName("day26.TestClass");
        Constructor con=c.getDeclaredConstructor(String.class);
        con.setAccessible(true);
        TestClass tc=(TestClass) con.newInstance("张三");
        System.out.println(tc);
    }
}
